package com.thd.springboottest.knife4j2x.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * com.thd.springboottest.kafka.controller.KafkaController
 *
 * @author: wanglei62
 * @DATE: 2022/3/29 11:52
 **/
@Api(tags = "首页模块")
@Controller
@RequestMapping("/knife4j2x")
public class KafkaController {


    @GetMapping("/test")
    @ResponseBody
    // url http://127.0.0.1:8899/thd/knife4j2x/test
    public String test()  {
        System.out.println("SUCCESS");

        return "SUCCESS";
    }

    @ApiImplicitParam(name = "name",value = "姓名",required = true)
    @ApiOperation(value = "向客人问好")
    @GetMapping("/sayHi")
    public ResponseEntity<String> sayHi(@RequestParam(value = "name")String name){
        return ResponseEntity.ok("Hi:"+name);
    }


}
